#include <opencv/cv.h>
#include <opencv/highgui.h>

int main(int argc,char** argv)
{
    if(argc<2)
    {
        printf("Usage,needsimage\n");
        return 1;
    }
    IplImage* img=0;  //图片指针
    img=cvLoadImage(argv[1]);
    if(img)
    {
        //printf("Processing a %d*%d image with %d channels\n",img->height,img->width,img->nChannels);

        printf("高:%d\n",img->height);
        printf("宽:%d\n",img->width);

        //cvNamedWindow("main",CV_WINDOW_AUTOSIZE);  //创建窗口
        //cvShowImage("main",img);  //显示图片

        //cvWaitKey(0);   //等待按键

        cvReleaseImage(&img);  //释放图片

        return 0;
    }
}